<html>
<head><meta charset="utf-8"><title>Handling of empty regions #68550 · t-compiler/wg-nll · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/index.html">t-compiler/wg-nll</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/Handling.20of.20empty.20regions.20.2368550.html">Handling of empty regions #68550</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="192312912"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/Handling%20of%20empty%20regions%20%2368550/near/192312912" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/Handling.20of.20empty.20regions.20.2368550.html#192312912">(Mar 30 2020 at 20:27)</a>:</h4>
<p>Hey <span class="user-mention" data-user-id="116009">@nikomatsakis</span> , at some point I'd like to discuss with you (and perhaps <span class="user-mention" data-user-id="116118">@Matthew Jasper</span> ) your thoughts on what we should do about empty regions and/or <code>ReEmpty</code></p>



<a name="192313912"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/Handling%20of%20empty%20regions%20%2368550/near/192313912" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/Handling.20of.20empty.20regions.20.2368550.html#192313912">(Mar 30 2020 at 20:36)</a>:</h4>
<p>In the case of <a href="https://github.com/rust-lang/rust/issues/68550" title="https://github.com/rust-lang/rust/issues/68550">#68550</a>, we are trying to <code>eval_verify_bound</code> where the lower bound is <code>'_#7r</code> and the verify_bound is <code>AnyBound([OutlivedBy(ReEmpty(U0)), OutlivedBy(ReStatic), OutlivedBy('_#2r)])</code></p>



<a name="192314234"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/Handling%20of%20empty%20regions%20%2368550/near/192314234" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/Handling.20of.20empty.20regions.20.2368550.html#192314234">(Mar 30 2020 at 20:39)</a>:</h4>
<p>I did see we have some special case code in <code>rustc_mir::borrow_check::type_check::constraint_conversion</code> to avoid pushing a constraint when the right hand side is <code>ReEmpty(UniverseIndex::ROOT)</code></p>



<a name="192314303"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/Handling%20of%20empty%20regions%20%2368550/near/192314303" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/Handling.20of.20empty.20regions.20.2368550.html#192314303">(Mar 30 2020 at 20:39)</a>:</h4>
<p>does <code>eval_verify_bound</code> need some similar special case code, to avoid calling <code>to_region_vid</code> on such regions?</p>



<a name="192314352"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/Handling%20of%20empty%20regions%20%2368550/near/192314352" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/Handling.20of.20empty.20regions.20.2368550.html#192314352">(Mar 30 2020 at 20:40)</a>:</h4>
<p>or is there a broader change that you think you would be more appropriate?</p>



<a name="192316911"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/Handling%20of%20empty%20regions%20%2368550/near/192316911" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Matthew Jasper <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/Handling.20of.20empty.20regions.20.2368550.html#192316911">(Mar 30 2020 at 21:01)</a>:</h4>
<p>I think that having a vid corresponding to each reempty is what we eventually want, I'm not sure if doing that is enough to fix this issue though.</p>



<a name="192317002"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/Handling%20of%20empty%20regions%20%2368550/near/192317002" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/Handling.20of.20empty.20regions.20.2368550.html#192317002">(Mar 30 2020 at 21:02)</a>:</h4>
<p><span class="user-mention" data-user-id="116083">@pnkfelix</span> I happen to be working right now on a PR to extend our handling ReEmpty in/around NLL</p>



<a name="192317032"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/Handling%20of%20empty%20regions%20%2368550/near/192317032" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/Handling.20of.20empty.20regions.20.2368550.html#192317032">(Mar 30 2020 at 21:02)</a>:</h4>
<p>and I was wanting to refactor precisely that special-case code</p>



<a name="192317240"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/Handling%20of%20empty%20regions%20%2368550/near/192317240" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/Handling.20of.20empty.20regions.20.2368550.html#192317240">(Mar 30 2020 at 21:04)</a>:</h4>
<p>though I'm not <em>exactly</em> sure what I want to do :)</p>



<a name="192317287"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/Handling%20of%20empty%20regions%20%2368550/near/192317287" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/Handling.20of.20empty.20regions.20.2368550.html#192317287">(Mar 30 2020 at 21:05)</a>:</h4>
<p>I was expecting to make a vid for each empty, I guess, which means that all variables would then have to include the "empty element" for their universe</p>



<a name="192433845"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/Handling%20of%20empty%20regions%20%2368550/near/192433845" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> pnkfelix <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/Handling.20of.20empty.20regions.20.2368550.html#192433845">(Mar 31 2020 at 18:56)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> okay, maybe I'll just assign <a href="https://github.com/rust-lang/rust/issues/68550" title="https://github.com/rust-lang/rust/issues/68550">#68550</a> to you, then? Since I suspect your refactoring will address it.</p>



<a name="192436989"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/122657-t-compiler/wg-nll/topic/Handling%20of%20empty%20regions%20%2368550/near/192436989" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/122657-t-compiler/wg-nll/topic/Handling.20of.20empty.20regions.20.2368550.html#192436989">(Mar 31 2020 at 19:20)</a>:</h4>
<p>that seems ok</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>